function uploadThumb(callback) {
	var upload = document.createElement("input");
	upload.type = "file";
	upload.id = '_imgupload'
	upload.onchange = function() {
		var file = this.files[0];
		var data = new FormData();
		data.append("files", file);
		var picCheck = upPicCheck({file:file});
		if(picCheck.status != 1){
			_alert.error({
				title:'图片错误',
				msg:picCheck.msg
			});
			return;
		}

        $.ajax({
            url: '/index/test/unifiedUpload/name/files',
            type: 'POST',
            cache: false,
            data: data,
            processData: false,
            contentType: false,
            dataType: "json",
            beforeSend: function (res) {

            },
            success: function (res) {
				if(res.error == 0){
					_alert.info('上传成功');
					$('#thumblink').val(res.url);
				}else{
					_alert.error({
						title:'上传失败',
						msg:'服务器异常文件上传失败,请刷新重试。'
					});
				}
            }
        });
	}
	upload.click();
}



function setAddCont(pid){
	// $('.docupload .left .tagbtn .item.active')
	console.log(pid);
	$('.docupload .left .tagbox .item ul li').hide();
	$('.docupload .left .tagbox .item ul li[pid='+parseInt(pid)+']').show();
}